package com.itdaan.portal.business.domain;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;

import org.apache.commons.lang.StringUtils;
import org.bouncycastle.util.encoders.Base64;


/**
 * 作者信息
 **/
@SuppressWarnings("serial")
public class Author implements Serializable {

	/**主键**/
	private Integer id;

	/**作者**/
	private String author;
	
	/** 作者base64**/
	private String base64Author;

	/**网站ID**/
	private Integer webId;

	/**博客数量**/
	private Integer blogCount;

	/**是否为本站作者 0 不是 1 是**/
	private Integer isNative;



	public void setId(Integer id){
		this.id = id;
	}

	public Integer getId(){
		return this.id;
	}

	public void setAuthor(String author){
		if(StringUtils.isNotEmpty(author)){
			try {
				this.base64Author = new String(Base64.encode(author.getBytes("utf-8")),"utf-8");
			} catch (UnsupportedEncodingException e) {
				e.printStackTrace();
			}
		}
		this.author = author;
	}

	public String getAuthor(){
		return this.author;
	}

	public void setWebId(Integer webId){
		this.webId = webId;
	}

	public Integer getWebId(){
		return this.webId;
	}

	public void setBlogCount(Integer blogCount){
		this.blogCount = blogCount;
	}

	public Integer getBlogCount(){
		return this.blogCount;
	}

	public void setIsNative(Integer isNative){
		this.isNative = isNative;
	}

	public Integer getIsNative(){
		return this.isNative;
	}

	public String getBase64Author() {
		return base64Author;
	}

	public void setBase64Author(String base64Author) {
		this.base64Author = base64Author;
	}
	
}
